home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
webmon_1
/
frmnewse.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1999-08-09
|
6KB
|
181 lines
VERSION 5.00
Begin VB.Form frmNewServer
BackColor = &H00FF8080&
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 2805
ClientLeft = 0
ClientTop = 0
ClientWidth = 4050
LinkTopic = "Form1"
ScaleHeight = 2805
ScaleWidth = 4050
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.TextBox txtURL
Height = 285
Left = 1800
TabIndex = 2
Top = 720
Width = 2055
End
Begin VB.TextBox txtMachineName
Height = 285
Left = 1800
TabIndex = 1
Top = 1680
Width = 2055
End
Begin VB.TextBox txtIP
Height = 285
Left = 1800
TabIndex = 0
Top = 1200
Width = 2055
End
Begin VB.Label Label4
Alignment = 2 'Center
BackColor = &H00FF8080&
Caption = "Add New Server"
BeginProperty Font
Name = "Comic Sans MS"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 840
TabIndex = 6
Top = 120
Width = 2175
End
Begin VB.Image Image2
Height = 480
Left = 960
Picture = "frmNewServer.frx":0000
Top = 2160
Width = 480
End
Begin VB.Image command1
Height = 480
Left = 2160
Picture = "frmNewServer.frx":0442
Top = 2160
Width = 480
End
Begin VB.Label Label3
BackColor = &H00FF8080&
Caption = "Machine Name"
Height = 255
Left = 120
TabIndex = 5
Top = 1680
Width = 1095
End
Begin VB.Label Label2
BackColor = &H00FF8080&
Caption = "Server's IP address"
Height = 255
Left = 120
TabIndex = 4
Top = 1200
Width = 1455
End
Begin VB.Label Label1
BackColor = &H00FF8080&
Caption = "Server's URL"
Height = 255
Left = 120
TabIndex = 3
Top = 720
Width = 1095
End
Attribute VB_Name = "frmNewServer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mmflag As Boolean
Dim sax As Integer
Dim Say As Integer
Option Explicit
Private Sub Command1_Click()
If blnEdit = True Then
'editing server
If txtURL <> "" And txtIP <> "" And txtMachineName <> "" Then
SSetting "URL" & frmMain.intServClicked, txtURL
SSetting "IP" & frmMain.intServClicked, txtIP
SSetting "MName" & frmMain.intServClicked, txtMachineName
SayThis "Server " & txtMachineName & " Updated"
End If
modWeb.refresh
Unload Me
Else
'new server
If frmMain.lblServer(7).Visible = True Then
MsgBox ("No more servers!")
Else
If Val(txtIP) < 1 Or InStr(1, txtIP, ".") < 1 Then
MsgBox ("Thats not a valid IP address!!!!")
Else
If txtURL <> "" And txtIP <> "" And txtMachineName <> "" Then
SSetting "URL" & intNoOfServers, txtURL
SSetting "IP" & intNoOfServers, txtIP
SSetting "MName" & intNoOfServers, txtMachineName
intNoOfServers = intNoOfServers + 1
SSetting "NoOfServers", intNoOfServers
SayThis "Server " & txtMachineName & " Added to server list"
End If
modWeb.refresh
End If
End If
Unload Me
End If
End Sub
Private Sub command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
command1.BorderStyle = 1
End Sub
Private Sub Form_Load()
If blnEdit = True Then
Label4 = "Edit Server"
txtURL = LSetting("URL" & frmMain.intServClicked)
txtIP = LSetting("IP" & frmMain.intServClicked)
txtMachineName = LSetting("MName" & frmMain.intServClicked)
End If
End Sub
Private Sub Image2_Click()
Unload Me
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim fml As Long
Dim fmt As Long
Dim a As Integer
command1.BorderStyle = 0
Image2.BorderStyle = 0
If mmflag = True Then
fml = Me.Left: fmt = Me.Top
If X > sax Then Me.Left = fml + (X - sax)
If X < sax Then Me.Left = fml - (sax - X)
If Y > Say Then Me.Top = fmt + (Y - Say)
If Y < Say Then Me.Top = fmt - (Say - Y)
End If
End Sub
Private Sub form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If mmflag = False Then
sax = X
Say = Y
mmflag = True
End If
Me.MousePointer = vbSizePointer
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
mmflag = False
Me.MousePointer = vbDefault
End Sub
Private Sub Image2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image2.BorderStyle = 1
End Sub